/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: user
 * Date: 2024-02-20
 * Time: 19:57
 */
public class test {
    public static int func(int n) {
if(n<10){
    return n;
}
else{
    return n % 10+func(n/10);
}
    }
    public static void main(String[] args) {
int ret = func(173);
        System.out.println(ret);
    }
}
